﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using ArcannEngine.Render;
using ArcannEngine.Entities;

namespace ArcannEngine.Components
{
    abstract public class Component
    {
        // Referencja do obiektu ktory komponent obsluguje
        private Entity parent;

        public Component(Entity parentEntity)
        {
            this.parent = parentEntity;
        }

        public Entity Parent
        {
            get { return parent; }
        }

        protected virtual void Initialize()
        {
            this.parent.AddComponent(this);
        }

        public String Name
        {
            get { return this.GetName(); }
        }

        protected abstract String GetName();
        public virtual void Update(GameTime gameTime) { }
        public virtual void Draw(GameTime gameTime, List<RenderDescription> renderDescriptions) { }

    }
}
